package com.ruoyi.web.controller.mall.orderOrder.service.impl;

import com.ruoyi.web.controller.mall.orderOrder.domain.OrderOrder;
import com.ruoyi.web.controller.mall.orderOrder.mapper.OrderOrderMapper;
import com.ruoyi.web.controller.mall.orderOrder.service.IOrderOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 订单信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-01-18
 */
@Service
public class OrderOrderServiceImpl implements IOrderOrderService 
{
    @Autowired
    private OrderOrderMapper orderOrderMapper;

    /**
     * 查询订单信息
     * 
     * @param id 订单信息ID
     * @return 订单信息
     */
    @Override
    public OrderOrder selectOrderOrderById(String id)
    {
        return orderOrderMapper.selectOrderOrderById(id);
    }

    @Override
    public Map<String, Object> queryByOrderId(String id) {
        return orderOrderMapper.queryByOrderId(id);
    }

    @Override
    public Map<String, Object> queryByCountDay(Map<String, Object> map) {
        return orderOrderMapper.queryByCountDay(map);
    }

    /**
     * 查询订单信息列表
     * 
     * @param map 订单信息
     * @return 订单信息
     */
    @Override
    public List<Map<String,Object>> selectOrderOrderList(Map<String,Object> map)
    {
        return orderOrderMapper.selectOrderOrderList(map);
    }

    @Override
    public List<Map<String, Object>> countByToday(Map<String, Object> map) {
        return orderOrderMapper.countByToday(map);
    }

    @Override
    public BigDecimal todayMoney(Map<String, Object> map) {
        return orderOrderMapper.todayMoney(map);
    }

    @Override
    public Integer allNum(Map<String, Object> map) {
        return orderOrderMapper.allNum(map);
    }

    /**
     * 新增订单信息
     * 
     * @param orderOrder 订单信息
     * @return 结果
     */
    @Override
    public int insertOrderOrder(OrderOrder orderOrder)
    {
        return orderOrderMapper.insertOrderOrder(orderOrder);
    }

    /**
     * 修改订单信息
     * 
     * @param orderOrder 订单信息
     * @return 结果
     */
    @Override
    public int updateOrderOrder(OrderOrder orderOrder)
    {
        return orderOrderMapper.updateOrderOrder(orderOrder);
    }

    /**
     * 删除订单信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteOrderOrderByIds(String[] ids)
    {
        return orderOrderMapper.deleteOrderOrderByIds(ids);
    }

    /**
     * 删除订单信息信息
     * 
     * @param id 订单信息ID
     * @return 结果
     */
    @Override
    public int deleteOrderOrderById(String id)
    {
        return orderOrderMapper.deleteOrderOrderById(id);
    }
}
